﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CalcStats
{
    public class Calc
    {
        private int[] valueArray = { 6, 9, 15, -2, 92, 11 };

        public Calc()
        { 
            
        }

        public int Minimum()
        {
            int min = valueArray[0];
            for (int i = 1; i < valueArray.Length; i++)
            {
                if (min > valueArray[i])
                {
                    min = valueArray[i];
                }
            }
            return min;
        }

        public int Maximum()
        {
            int max = valueArray[0];
            for (int i = 1; i < valueArray.Length; i++)
            {
                if (max < valueArray[i])
                {
                    max = valueArray[i];
                }
            }
            return max;
        }

        public int expectedN()
        {
            return valueArray.Length;
        }

        public double averageN()
        {
            double Sum = 0;
            double testSum = 0;
            for (int i = 0; i < valueArray.Length; i++)
            {
                Sum = Sum + valueArray[i];
            }

            testSum = Sum / valueArray.Length;

            return testSum;
        }

    }
}
